package com.example.album;

import jakarta.persistence.*;

@Entity
@Table(name = "album")
public class Album {
    @Id
    @Column(name = "album_id", length = 16)
    private String albumId;

    @Column(name = "album_name", length = 30, nullable = false)
    private String albumName;

    @Column(name = "owner_id", length = 16, nullable = false)
    private String ownerId;

    @Column(name = "category_id", length = 100, nullable = false)
    private String categoryId;

    @Column(name = "count_like")
    private Integer countLike;

    @Column(name = "count_collection")
    private Integer countCollection;


    @Column(name = "count_comment")
    private Integer countComment;



    @Column(name = "cover_id")
    private String coverId;

    @Column(name = "status")
    private Integer status;

    @Column(name = "created_date")
    private java.sql.Date createdDate;

    // getter/setter
    public String getAlbumId() { return albumId; }
    public void setAlbumId(String albumId) { this.albumId = albumId; }
    public String getAlbumName() { return albumName; }
    public void setAlbumName(String albumName) { this.albumName = albumName; }
    public String getOwnerId() { return ownerId; }
    public void setOwnerId(String ownerId) { this.ownerId = ownerId; }
    public String getCategoryId() { return categoryId; }
    public void setCategoryId(String categoryId) { this.categoryId = categoryId; }
    public Integer getCountLike() { return countLike; }
    public void setCountLike(Integer countLike) { this.countLike = countLike; }
    public Integer getCountCollection() { return countCollection; }
    public void setCountCollection(Integer countCollection) { this.countCollection = countCollection; }
    public Integer getCountComment() { return countComment; }
    public void setCountComment(Integer countComment) { this.countComment = countComment; }
    public String getCoverId() { return coverId; }
    public void setCoverId(String coverId) { this.coverId = coverId; }
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    public java.sql.Date getCreatedDate() { return createdDate; }
    public void setCreatedDate(java.sql.Date createdDate) { this.createdDate = createdDate; }
    public String getCreateTime() {
        return createdDate.toString();
    }
    public void setCreateTime(java.sql.Timestamp createTime) {
        this.createdDate = new java.sql.Date(createTime.getTime());
    }
}
